package com.starbaba.core.web.taglib;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ComponentTagSupport;

import com.opensymphony.xwork2.util.ValueStack;
import com.starbaba.core.hibernate.Page;
import com.starbaba.core.web.taglib.component.TerminalPageComponent;

@SuppressWarnings("serial")
public class TerminalPageTag extends ComponentTagSupport{
	private Page page;
    private String numb;
	@Override
	public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
		return new TerminalPageComponent(stack);
	}
	
	@Override
	protected void populateParams() {
		super.populateParams();
		TerminalPageComponent pageComponent = (TerminalPageComponent)this.getComponent();
		pageComponent.setPage(page);
		pageComponent.setNumb(numb);
    }

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public String getNumb() {
		return numb;
	}

	public void setNumb(String numb) {
		this.numb = numb;
	}
}
